package com.sky.wsp.rabbitmq.topic.vo;


import java.io.Serializable;

/**
 * @desccription IDaaS消息对象
 * @auth wangshaopeng@talkweb.com.cn
 * @date 2022/9/30
 */
public class IDaaSMessage<T> implements Serializable {

    private static final long serialVersionUID = -1694603681212972531L;

    String tenantId;
    MessageTypeEnum messageType;
    EventTypeEnum eventType;
    T data;

    public IDaaSMessage() {
    }

    public IDaaSMessage(MessageTypeEnum messageType) {
        this.messageType = messageType;
    }

    public String getTenantId() {
        return tenantId;
    }

    public IDaaSMessage setTenantId(String tenantId) {
        this.tenantId = tenantId;
        return this;
    }

    public MessageTypeEnum getMessageType() {
        return messageType;
    }

    public IDaaSMessage setMessageType(MessageTypeEnum messageType) {
        this.messageType = messageType;
        return this;
    }

    public EventTypeEnum getEventType() {
        return eventType;
    }

    public IDaaSMessage setEventType(EventTypeEnum eventType) {
        this.eventType = eventType;
        return this;
    }

    public T getData() {
        return data;
    }

    public IDaaSMessage setData(T data) {
        this.data = data;
        return this;
    }

    @Override
    public String toString() {
        return "IDaaSMessage{" +
                "tenantId='" + tenantId + '\'' +
                ", messageType=" + messageType +
                ", eventType=" + eventType +
                ", data=" + data +
                '}';
    }
}
